package com.shensi.api.pay.client;

import com.shensi.api.pay.pojo.IntegralOrder;
import com.shensi.common.core.constant.CloudConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

/*
 * <Title> IntegralShoppingMallController </Title>
 * <Description> 油站积分商城模块 </Description>
 * @Date 2021年2月24日
 */

@Api(tags = "积分商城")
@FeignClient(name = CloudConstant.PAY_SERVER)
public interface IntegralShoppingMallClient {

    //获取积分商城轮播图片
    @RequestMapping(value = "/getIntegralShopPicInfoList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取积分商城轮播图片", httpMethod = "GET", notes = "积分商城轮播图片")
    public String getIntegralShopPicInfoList(@ApiParam(value = "油站ID", required = true) Integer stationId);

    //获取油站积分商品详情信息
    @RequestMapping(value = "/getIntegralWaresInfo", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取油站积分商品详细信息", httpMethod = "GET", notes = "油站积分商品详细信息")
    public String getIntegralWaresInfo(@ApiParam(value = "商品ID", required = true) Integer id);


    //获取油站积分商品信息
    @RequestMapping(value = "/getIntegralWaresInfoList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取油站积分商品列信息", httpMethod = "GET", notes = "油站积分商品列信息")
    public String getIntegralWaresInfoList(@ApiParam(value = "油站ID", required = true) Integer stationId);

    //生成积分订单
    @RequestMapping(value = "/insertIntegralOrder", method = RequestMethod.POST)
    @ResponseBody
    @Transactional(rollbackFor = Exception.class)
    @ApiOperation(value = "生成积分订单", httpMethod = "POST", notes = "生成积分订单")
    public String insertIntegralOrder(@RequestBody IntegralOrder request);

    //获取用户积分订单列表
    @RequestMapping(value = "/getUserIntegralOrderList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取用户积分订单列表", httpMethod = "GET", notes = "用户积分订单列表")
    public String getUserIntegralOrderList(@ApiParam(value = "客户手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
                                           @ApiParam(value = "油站ID", required = true) @RequestParam("enterpriseId") Integer enterpriseId);

    //获取客户积分信息
    @RequestMapping(value = "/getCustomerPointsInfo", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取客户积分信息", httpMethod = "GET", notes = "获取客户积分信息")
    public String getCustomerPointsInfo(@ApiParam(value = "客户手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
                                        @ApiParam(value = "油站ID", required = true) @RequestParam("enterpriseId") Integer enterpriseId);

    //获取客户积分记录信息
    @RequestMapping(value = "/getCustomerPointsRecordList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取客户积分记录信息", httpMethod = "GET", notes = "获取客户积分记录信息")
    public String getCustomerPointsRecordList(@ApiParam(value = "客户手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
                                              @ApiParam(value = "油站ID", required = true) @RequestParam("enterpriseId") Integer enterpriseId);

    //获取油站油品积分规则信息 根据油企ID和油品名称
    @RequestMapping(value = "/getIntegralRuleListByOilNameAndStationId", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取油站油品积分规则信息 根据油站ID和油品名称", httpMethod = "GET", notes = "获取油站油品积分规则信息 根据油站ID和油品名称")
    public String getIntegralRuleListByOilNameAndStationId(@ApiParam(value = "油站ID", required = true) @RequestParam("enterpriseId") Integer enterpriseId, @RequestParam(value = "oilName", required = false) String oilName, @RequestParam(value = "oilType", required = false) String oilType);

    //获取油站积分规则信息 根据油站ID
    @RequestMapping(value = "/getIntegralRuleList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取油站积分规则信息", httpMethod = "GET", notes = "获取油站积分规则信息")
    public String getIntegralRuleList(@ApiParam(value = "油站ID", required = true) Integer enterpriseId);

    @RequestMapping(value = "/getUserIntegralDetail", method = RequestMethod.GET)
    @ApiOperation(value = "获取用户积分明细", httpMethod = "GET")
    @ResponseBody
    public String getUserIntegralDetail(@ApiParam(value = "客户手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
                                        @ApiParam(value = "油站ID", required = true) @RequestParam("enterpriseId") Integer enterpriseId);

    @RequestMapping(value = "/getMerchandiseOrderWrittenOff", method = RequestMethod.GET)
    @ApiOperation(value = "获取用户积分商品订单是否核销", httpMethod = "GET")
    @ResponseBody
    public String getMerchandiseOrderWrittenOff(@ApiParam(value = "客户手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
                                                @ApiParam(value = "积分订单号", required = true) @RequestParam("integralOrderNo") String integralOrderNo);


}
